import { useArray, useMount } from "utils";
import React from "react";

export const tsTest = () => {
  interface p {
    name: string;
    age: number;
  }
  const persons: p[] = [
    { name: "jack", age: 25 },
    { name: "ma", age: 27 },
  ];
  const { value, setValue, add, clear, removeIndex } = useArray(persons);
  console.log(
    //value.notExsit,
    value,
    add({ name: "john", age: 21 }),
    clear(),
    removeIndex(2),
  );
};
